<template>
    <view class="purchaseDetailContainer">
        <cunstom_navigation_bar :tapEvent="goback" :propStyles="propStyles" :title="'厨娘须知'">
        </cunstom_navigation_bar>

        <view class="centerBox">
            <image class="photo"
                :src="'https://visionmpapi.jiuerjindi.com/upload/mp/notice/notice'+(pageIndex+1)+'.png'"
                mode="widthFix">
            </image>
        </view>

        <view class="buttons">

            <view class="last" v-if="pageIndex!=0" @tap="changeIndex(-1)">上一页</view>
            <view class="hide" v-if="pageIndex==0"  ></view>

            <view class="next" v-if="pageIndex!=3" @tap="changeIndex(1)">下一页</view>
        </view>


    </view>
</template>
<script>
    const util = require("@/utils/util.js");
    const api = require("@/utils/api.js");
    var QQMapWX = require('../utils/qqmap-wx-jssdk.js');
    const mapChange = require('../utils/mapChange.js');

    const app = getApp();
    export default {
        data() {
            return {
                pageIndex: 0,

                openId: "",
                phone: '',
                name: '',
                tip: '家',

                imgDomain: "",

                propStyles: {
                    // iconSrc: "../https://visionmpapi.jiuerjindi.com/upload/mp/ucenter/backIcon.png",
                    iconSrc: "black",
                    // bgColor: '#FECF01',
                },
                type: null,

            };
        },
        computed: {

        },
        methods: {
            changeIndex(num){
                this.pageIndex =  this.pageIndex + num
            },
            jumpTo(url) {
                uni.navigateTo({
                    url: url,
                })
            },


            goback() {
                console.log("回去");
                uni.navigateBack();
            },


        },
        onReady() { },
        // onShow(){

        //       },
        created() { },
        onShow: function () {

        },



        onLoad: function (option) {


            this.imgDomain = process.env.VUE_APP_BASE_URL;
            this.type = option.type;
            console.log("->option.type:" + option.type);
            if (this.type == "edit") {
                let obj = JSON.parse(option.obj);
                this.name = obj.realname;
                this.phone = obj.mobile;
                this.detailAddr = obj.address;
                this.tip = obj.tip;
                this.id = obj.id;
            }

        },

    };
</script>
<style lang="scss">
    page {
        height: 100vh;
        overflow: auto;
        background: #F4F4F2;
    }
</style>
<style lang="scss" scoped>
    .purchaseDetailContainer {
        background: #f4f4f2;
        box-sizing: border-box;

        /* ::v-deep .companyInfoContainer {
        position: absolute;
        top: 0rpx;
        left: 0rpx;
  
        .navigationBar {
          background: transparent;
        }
      } */
    }



    .centerBox {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 56rpx;

        .photo {
            width: 690rpx;
        }


    }

    .buttons {
        width: 750rpx;
        position: fixed;
        bottom: 40rpx;
        left: 0rpx;
        display: flex;
        justify-content: space-between;
        padding: 0rpx 36rpx;

        view {
            line-height: 114rpx;
            text-align: center;
            font-family: Inter, Inter;
            font-weight: 600;
            font-size: 32rpx;
            color: #333333;
        }
        .hide{
            width: 292rpx;
            height: 114rpx;
        }
        .last {
            width: 292rpx;
            height: 114rpx;

            background: #F4F4F4;
            box-shadow: 0rpx 6rpx 10rpx 4rpx rgba(0, 0, 0, 0.07);
            border-radius: 20rpx 20rpx 20rpx 20rpx;
        }

        .next {
            width: 292rpx;
            height: 114rpx;
            background: #FECF01;
            box-shadow: 0rpx 6rpx 10rpx 4rpx rgba(0, 0, 0, 0.07);
            border-radius: 20rpx 20rpx 20rpx 20rpx;
        }
    }











    ::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
        color: transparent;
    }
</style>